package com.four.basicinfo.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.four.basicinfo.entity.Abroad;
import com.four.basicinfo.entity.Career;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CareerDao extends BaseMapper<Career> {
    /**
     * 查询亲属从事相关职业
     *
     * @param id 亲属从事相关职业主键
     * @return 亲属从事相关职业
     */
    public Career selectCareerById(Long id);
    //查询个人
    @Select("select  id,number,name,relationship,identity,duties,unit," +
            "is_partner as isPartner,is_district as isDistrict, district, scope, is_apply as idApply, content, notes from career where number=#{number}")
    public List<Career> selectByNum(Integer number);
    /**
     * 新增亲属从事相关职业
     *
     * @param career 亲属从事相关职业
     * @return 结果
     */
    public int insertCareer(Career career);

    /**
     * 修改亲属从事相关职业
     *
     * @param career 亲属从事相关职业
     * @return 结果
     */
    public int updateCareer(Career career);

    /**
     * 删除亲属从事相关职业
     *
     * @param id 亲属从事相关职业主键
     * @return 结果
     */
    public int deleteCareerById(Long id);
}
